<?php

namespace Xylife\Web\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;

class WeChatController extends Controller {

  public function serve() {
    Log::info('request arrived.');

    $app = app('wechat.official_account');

    $app->server->push(function ($message) {

      return '你好,欢迎关注锡猿生活!';
    });

    return $app->server->serve();
  }
}
